<!-- 用于测试模块化开发工具 -->
<%
   select_option = []
   (select_option << ['项目', 'projects'])
   #(select_option << ['课程', 'courses']) if project_type == Project::ProjectType_course
   #select_option << ['热帖', 'memos']
   #select_option << ['教师', 'users_teacher'],
   #select_option << ['学生', 'users_student']
%>

<style type="text/css">
    form #q, form #search_type{
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        display: inline-block;
        margin: 0px;
        padding: 5px;
        height: 33px;
    }
    form #q{
        font-size: 13px;
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
        border-right: none;

    }
    form #search_type{
        font-size: 13px;
        color: #363739;
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
        border-bottom-left-radius: 0px;
        border-top-left-radius: 0px;
        border-left: 1px outset #83A9A9;
        margin-left: -4px;
        -webkit-appearance: none;
        -moz-appearance: none;
        text-indent: 0.01px;
        text-overflow: '';
    }
    .search_widget{
        display:inline-block;
        border-radius: 5px;
    }
    .search_widget:hover{
        box-shadow: 0px 0px 3px #56B4EF;
    }
    <%#完了把上面东西放到 .css 里%>
</style>

<%###################search topics###########################%>
<%= form_tag({controller: :relative_memos, action: :search }, method: :get, :target => :_blank) do %>
    <div class="project-search" style="float: right">
      <div class='search_widget' style="display: none;">
        <%= text_field_tag :name, nil, placeholder:'请输入要搜索的关键字', :size => 27, :class => "topics-search-text-field" %>
      </div>
      <%#= hidden_field_tag 'project_type', project_type %>
      <%= submit_tag l(:label_search_topics), :class => "enterprise", :name => nil %>
    </div>
<% end %>
<%###################search topics###########################%>


<%= form_tag({controller: :open_source_projects, action: :search }, method: :get, :target => :_blank) do %>
    <div class="project-search" style="float: right; margin-right: 10px;">
      <div class='search_widget'>
        <%= text_field_tag :name, nil, placeholder:'请输入要搜索的关键字',
                           :size => 27, :class => "projects-search-text-field",
                           :onChange => "$('.topics-search-text-field').val($('.projects-search-text-field').val())" %>
      </div>
      <%#= hidden_field_tag 'project_type', project_type %>
      <%= submit_tag l(:label_search_projects), :class => "enterprise", :name => nil, :onclick => "user_trace_search_project_in_search_bar();" %>
    </div>
<% end %>
